package com.workerhelping.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_confirm")
public class Confirm implements Serializable {
    @TableId
    private Integer id;
    // 操作日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date operationDate;
    // 操作代号，对应枚举
    private Integer operation;
    // 操作原因
    private String reason;
    // 是否查看过此信息
    private Integer checked;
    // 职工id
    private Integer wId;
    // 职工
    @TableField(select = false,exist = false)
    private Worker worker;

    public Confirm(Date operationDate, Integer operation, String reason, Integer wId) {
        this.operationDate = operationDate;
        this.operation = operation;
        this.reason = reason;
        this.wId = wId;
    }
}
